#ifndef NETWORKSERVICES_ROUTER_H
#define NETWORKSERVICES_ROUTER_H

#include <string>
#include <functional>
#include <unordered_map>
#include "json.hpp"

using json = nlohmann::json;

class Router {
public:
    static int Call(const std::string &method, const json &request);

private:
    static int Test(const json &request);
    static int Update(const json &request);

    static std::unordered_map<std::string, std::function<int(json)>> routerMap;
};


#endif //NETWORKSERVICES_ROUTER_H
